package com.spleeb.pixelengine;

import android.util.FloatMath;

public class GameMath {
	public static final float RD = (float)(180/Math.PI);
	public static final float DR = (float)(Math.PI/180);
	public static final float PI = (float)Math.PI;
	public static final float QPI = (float)(Math.PI/2);
	public static final float TPI = PI + QPI;
	public static final int sqrt(int x){
		return (int)FloatMath.sqrt(x);
	}
	public static final float sqrt(float x){
		return FloatMath.sqrt(x);
	}
	public static final float cos(float x){
		return FloatMath.cos(x);
	}
	public static final float sin(float x){
		return FloatMath.sin(x);
	}
	public static final int ceil(float x){
		return (int) FloatMath.ceil(x);
	}
	public static final int rand(int i) {
		return (int)(i*Math.random());
	}
	public static final float abs(float x){
		return (float)Math.abs(x);
	}
	public static final float rand(){
		return (float)(Math.random());
	}
	public static final int round(float x){
		return (int)Math.round(x);
	}
}
